package base.迭代器遍历;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.function.Consumer;

public class Lambda表达遍历 {
    public static void main(String[] args){
        ArrayList<String> arrl = new ArrayList<>();
        arrl.add("萧容鱼");
        arrl.add("沈幼楚");

        arrl.forEach(new Consumer<String>() {
            @Override
            public void accept(String s) {
                System.out.println(s);
            }
        });
    }
}
